home *** CD-ROM | disk | FTP | other *** search
/ Hollywood Hardbodies / Hollywood Hard Bodies.iso / autorun / prdi.pas < prev    next >
Pascal/Delphi Source File  |  1996-03-02  |  1KB  |  68 lines

  1. unit Prdi;
  2.  
  3. interface
  4.  
  5. uses WinTypes, WinProcs, Classes, Graphics, Forms, Controls, Buttons,
  6.   StdCtrls, ExtCtrls,Printers;
  7.  
  8. type
  9.   TpriDial = class(TForm)
  10.     OKBtn: TBitBtn;
  11.     CancelBtn: TBitBtn;
  12.     Bevel1: TBevel;
  13.     c1: TRadioButton;
  14.     c2: TRadioButton;
  15.     c3: TRadioButton;
  16.     procedure CancelBtnClick(Sender: TObject);
  17.     procedure OKBtnClick(Sender: TObject);
  18.   private
  19.     { Private declarations }
  20.   public
  21.     { Public declarations }
  22.   end;
  23.  
  24. var
  25.   priDial: TpriDial;
  26.  
  27. implementation
  28.  
  29. {$R *.DFM}
  30.  
  31. procedure TpriDial.CancelBtnClick(Sender: TObject);
  32. begin
  33. close;
  34. end;
  35.  
  36. procedure TpriDial.OKBtnClick(Sender: TObject);
  37. var
  38.    f,myfile:Textfile;
  39.    str:String;
  40.    col,i:integer;
  41. begin
  42.      if c1.checked then col:=1;
  43.      if c2.checked then col:=2;
  44.      if c3.checked then col:=3;
  45.      AssignFile(f,'c:\temp.ben');
  46.      Reset(f);
  47.      AssignPrn(MyFile);
  48.      Rewrite(MyFile);
  49.      writeln(myfile,' ');
  50.      While not Eof(f) do
  51.      begin
  52.      for i:=1 to col do
  53.      begin
  54.      try
  55.      readln(f,str);
  56.      Write(MyFile, str:20);
  57.      finally
  58.      end;
  59.      end;
  60.      writeln(Myfile);
  61.      end;
  62.      closefile(f);
  63.      System.CloseFile(MyFile);
  64.  
  65. end;
  66.  
  67. end.
  68.